package org.jeecg.modules.mr.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.mr.entity.MrRecords;
import org.jeecg.modules.mr.vo.MrBookReadsVO;
import org.jeecg.modules.mr.vo.MrIndexDataVO;
import org.jeecg.modules.mr.vo.ReadRecordVo;

import java.util.List;

/**
 * @Description: 抄表记录
 * @Author: jeecg-boot
 * @Date:   2022-02-03
 * @Version: V1.0
 */
public interface MrRecordsMapper extends BaseMapper<MrRecords> {

    /**
     * 查询 水表户是否已抄表审核
     *
     * @param cusId
     * @return
     */
    Integer queryCusIsReaded(@Param("cusId") String cusId,@Param("id") String id);

    /**
     * 查询抄表记录计量信息
     * @param rdIds
     * @return
     */
    List<ReadRecordVo>queryReadMeasureRecord(@Param("rdIds") List<String>rdIds);

    /**查询待审抄表记录*/
    List<MrRecords>queryPendingRecords(@Param("query") MrRecords query);
    /**查询可以水量修改的抄表记录*/
    List<MrRecords>queryChangeRecords(@Param("query") MrRecords query);

    /**查询本月已抄水量*/
    List<MrIndexDataVO>queryMrIndexDataAccount();
    /**查询本月已审数据*/
    List<MrIndexDataVO>queryMrIndexDataAudit();

    /**查询本月抄表表数据*/
    List<MrBookReadsVO>queryBookReadCount(@Param("query") MrRecords query);

}
